package com.automobile.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.automobile.dao.SugestDao;
import com.automobile.domain.Sugest;

@Controller
@RequestMapping("/sugest")
public class SugestController {
	
	@Autowired
	private SugestDao sugestDao;
	
	@RequestMapping("/message")
	public @ResponseBody int message(@RequestBody Sugest sugest) {
		if(sugest==null) {
			return 0;
		}
		sugestDao.newSugest(sugest);
		return 1;
	}









    //----------------------------------backstage----------------------------------//

}
